﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;

namespace Client
{
    class TestCase
    {
        static void Main(string[] args)
        {
            EndpointAddress edpHttp = new EndpointAddress("http://localhost:8900/");
            WSDualHttpBinding binding = new WSDualHttpBinding();
            CalculatorDuplexClient client = new CalculatorDuplexClient(binding, edpHttp);

            for (int i = 0; i < 10; i++)
            {
                Console.WriteLine("测试加 {0}", i);
                client.AddTo(i);

                Console.WriteLine("测试乘 {0} * {0}", i);
                double res = client.Multy(30, 30);
                Console.WriteLine(string.Format("乘结果{0}", res));
                Console.WriteLine("测试结束");

            }
        
            Console.ReadKey();
        }
    }
}
